package com.neudu.yiyang.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * @TableName backdown
 */
@TableName(value = "backdown")
@Data
public class Backdown implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private String remarks;
    private Integer isDeleted;
    private Integer customerId;
    private Date retreattime;
    private Integer retreattype;
    private String retreatreason;
    private Integer auditstatus;
    private String auditperson;
    private Date audittime;

    // 虚拟字段，用于存储客户姓名
    @TableField(exist = false)
    private String customerName;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Backdown other = (Backdown) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
                && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
                && (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
                && (this.getRetreattime() == null ? other.getRetreattime() == null : this.getRetreattime().equals(other.getRetreattime()))
                && (this.getRetreattype() == null ? other.getRetreattype() == null : this.getRetreattype().equals(other.getRetreattype()))
                && (this.getRetreatreason() == null ? other.getRetreatreason() == null : this.getRetreatreason().equals(other.getRetreatreason()))
                && (this.getAuditstatus() == null ? other.getAuditstatus() == null : this.getAuditstatus().equals(other.getAuditstatus()))
                && (this.getAuditperson() == null ? other.getAuditperson() == null : this.getAuditperson().equals(other.getAuditperson()))
                && (this.getAudittime() == null ? other.getAudittime() == null : this.getAudittime().equals(other.getAudittime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        result = prime * result + ((getRetreattime() == null) ? 0 : getRetreattime().hashCode());
        result = prime * result + ((getRetreattype() == null) ? 0 : getRetreattype().hashCode());
        result = prime * result + ((getRetreatreason() == null) ? 0 : getRetreatreason().hashCode());
        result = prime * result + ((getAuditstatus() == null) ? 0 : getAuditstatus().hashCode());
        result = prime * result + ((getAuditperson() == null) ? 0 : getAuditperson().hashCode());
        result = prime * result + ((getAudittime() == null) ? 0 : getAudittime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", remarks=").append(remarks);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", customerId=").append(customerId);
        sb.append(", retreattime=").append(retreattime);
        sb.append(", retreattype=").append(retreattype);
        sb.append(", retreatreason=").append(retreatreason);
        sb.append(", auditstatus=").append(auditstatus);
        sb.append(", auditperson=").append(auditperson);
        sb.append(", audittime=").append(audittime);
        sb.append(", customerName=").append(customerName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    // Getters and Setters
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public Date getRetreattime() {
        return retreattime;
    }

    public void setRetreattime(Date retreattime) {
        this.retreattime = retreattime;
    }

    public Integer getRetreattype() {
        return retreattype;
    }

    public void setRetreattype(Integer retreattype) {
        this.retreattype = retreattype;
    }

    public String getRetreatreason() {
        return retreatreason;
    }

    public void setRetreatreason(String retreatreason) {
        this.retreatreason = retreatreason;
    }

    public Integer getAuditstatus() {
        return auditstatus;
    }

    public void setAuditstatus(Integer auditstatus) {
        this.auditstatus = auditstatus;
    }

    public String getAuditperson() {
        return auditperson;
    }

    public void setAuditperson(String auditperson) {
        this.auditperson = auditperson;
    }

    public Date getAudittime() {
        return audittime;
    }

    public void setAudittime(Date audittime) {
        this.audittime = audittime;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }
}